package com.maxmlr.framework.orm;

import javax.sql.DataSource;
import java.io.Serializable;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @ClassName BaseDaoSupport
 * @Description TODO
 * @Author maxiao
 * @Date 2020/3/19 下午3:11
 * @Version V1.0
 */
public abstract class BaseDaoSupport<T extends Serializable, M extends Serializable>{

    private DataSource dataSource;

    protected abstract void setDataSource(DataSource dataSource);

    public void test(String sql) throws SQLException {
        Connection connection = dataSource.getConnection();

        PreparedStatement ps = connection.prepareStatement(sql);
        ResultSet rs = ps.executeQuery(sql);



    }


}
